package org.uni_hi.lsep.gui.util;

import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;

public class TextBoxFocusListener implements FocusListener {

	private VerifiedTextField ftf=null;
	
	public TextBoxFocusListener(VerifiedTextField f) {
		this.ftf=f;
	}
	
	@Override
	public void focusGained(FocusEvent e) {
		if(e.getSource().equals(ftf)&&ftf.isEditable()){
			ftf.getEditor().selectAll();
		}
	}

	@Override
	public void focusLost(FocusEvent e) {
	}

}
